From 4df66f64a91b5656ca13c368db062841d9ec7fa3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Mon, 11 Jan 2016 00:42:42 +0100 Subject: [PATCH] sse2: reuse linear premul/unpremul for gamma formats --- extensions/sse2-float.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/extensions/sse2-float.c b/extensions/sse2-float.c index 97b201b..31b58d1 100644 --- a/extensions/sse2-float.c +++ b/extensions/sse2-float.c @@ -568,6 +568,14 @@ init (void) babl_component ("Ba"), babl_component ("A"), NULL); + const Babl *rgbAF_gamma = babl_format_new ( + babl_model ("R'aG'aB'aA"), + babl_type ("float"), + babl_component ("R'a"), + babl_component ("G'a"), + babl_component ("B'a"), + babl_component ("A"), + NULL); const Babl *rgbaF_gamma = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("float"), @@ -622,6 +630,12 @@ init (void) "linear", conv_rgbaF_linear_rgbAF_linear, NULL); + + babl_conversion_new(rgbaF_gamma, + rgbAF_gamma, + "linear", + conv_rgbaF_linear_rgbAF_linear, + NULL); /* Which of these is faster varies by CPU, and the difference * is big enough that it's worthwhile to include both and @@ -632,6 +646,12 @@ init (void) "linear", conv_rgbAF_linear_rgbaF_linear_shuffle, NULL); + babl_conversion_new(rgbAF_gamma, + rgbaF_gamma, + "linear", + conv_rgbAF_linear_rgbaF_linear_shuffle, + NULL); + babl_conversion_new(rgbAF_linear, rgbaF_linear, "linear", -- 2.30.2